using System;
using System.Collections.Generic;
using System.Text;
using Decav.Data;

namespace Decav.Gatsb
{
    /// <summary>
    /// Gets an attachment, such as an image or video, to a <see cref="Post"/>.
    /// </summary>
    [Serializable]
    public class PostAttachment
    {
        public PostAttachment()
        {
            _id = Guid.NewGuid();
        }

        protected PostAttachment(DataRecordAdapter adapt)
        {
            _id = adapt.GetGuid("AttachmentId");
        }

        private Guid _id;

        /// <summary>
        /// Gets the unique identifier of the attachement.
        /// </summary>
        public Guid Id
        {
            get
            {
                return _id;
            }
        }
    }
}
